#生成目标TARGET前请生成objs
# make objs
# make nbserv
# 存在问题：如果外部的objs已经在外部生成，再执行make objs会跳过这些objs
TARGET = nbserv
TAR_OBJS = objs

SRCS = $(wildcard ./*.c)
SRCS += ../NetWorkProDefine.c ../ErrMsgPro.c

OBJS = $(SRCS:.c=.o)

INCLUDE += -I../



$(TARGET): $(wildcard ./*.o)
	$(CC) $^ -o $@

#仅仅触发生成$(OBJS)语句
$(TAR_OBJS): $(OBJS)


%.o: %.c
	$(CC) $(INCLUDE) -c $^


default: $(TAR_OBJS) $(TARGET)


.PHONY:clean

clean:
	-rm -f ./*.o
	-rm -f $(TARGET)